package day03;
//运算符的演示
public class OperDemo {
    public static void main(String[] args) {
        /*
        int a=5,b=5;
        System.out.println(a++);//5
        System.out.println(a);//6
        System.out.println(++b);//6
        System.out.println(b);//6
        a++;b++;
        int c=a++;
        int d=++b;
        System.out.println(c);//7
        System.out.println(d);//8
        int e=++d;
        e++;
        System.out.println(e);//10
        System.out.println(e++);//10
        System.out.println(++e);//12
        System.out.println(e);//12
         */
        /*
        int a=11,b=22,c=11;
        System.out.println(a++>b++);//false a=12,b=23
        System.out.println(a!=++c);//false c=12
        System.out.println(c--==a--);//true a=11,c=11
        System.out.println((++a)*2==b);//false a=12
        System.out.println(a)
         */
        /*
        int a=5,b=10,c=5;
        System.out.println(b>a||b<c);//true
        System.out.println(b<=c||b>a);//true
        System.out.println(b!=c || b>a);//true
        System.out.println(a==b || b<a);//false
        int score=90;
        System.out.println(score<0 || score>100);//成绩不合格无法验证
        boolean b2=!(a<b);
        System.out.println(b2);//!true=false
        System.out.println(!(a>b));//!false=

         */
        /*
        int a=5;
        a+=10;//相当于a=(int)(a+10)
        System.out.println(a);//15
        a*=2;//相当于a=(int)(a*2)
        System.out.println(a);//30
        a/=6;//相当于a=（int）（a/6）
        System.out.println(a);
        //小面试题
        short s=5;
        //s = s+10;//编辑错误，需要强转，改为s = (short)(s+10)
        s += 10;//自动强制转换
        int age = 39;
        System.out.println("age=");//age=
        System.out.println(age);//39
        System.out.println("age="+age);//age=39
        System.out.println("我今年"+age+"岁了");//我今年39岁了
        String name = "WKJ";
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了");//大家好，我叫WKJ,今年39岁了
        String w = "我是你爹";
        System.out.println(w);

         */
        System.out.println(10+20+""+30);//3030
        System.out.println(""+12+15+16);//121516
        System.out.println(79+3+4+"");//86
        int num = 0;
        int flag = num>0?1:-1;
        System.out.println(flag);
        //找两个数的最大值
        int a = 8,b = 56;
        int max = a>b?a:b;
        System.out.println(max);







    }
}
